package com.ruoyi.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.domain.TestExamPaper;
import com.ruoyi.domain.vo.TestExamPaperVo;
import com.ruoyi.mapper.TestExamPaperMapper;
import com.ruoyi.service.ITestExamPaperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 考试平台卷库Service业务层处理
 *
 */
@Service
public class TestExamPaperServiceImpl extends ServiceImpl<TestExamPaperMapper, TestExamPaper> implements ITestExamPaperService
{
    @Autowired
    private TestExamPaperMapper testExamPaperMapper;

    /**
     * 查询考试平台卷库详情
     *
     * @param examId 考试平台卷库主键
     * @return 考试平台卷库
     */
    @Override
    public TestExamPaperVo selectTestExamPaperByExamId(Long examId)
    {
        return testExamPaperMapper.selectTestExamPaperByExamId(examId);
    }

    /**
     * 查询考试平台卷库列表
     *
     * @param
     * @return 考试平台卷库
     */
    @Override
    public List<TestExamPaperVo> selectTestExamPaperList(String subjectName,String examName,String grade)
    {
        return testExamPaperMapper.selectTestExamPaperList(subjectName,examName,grade);
    }

    /**
     * 新增考试平台卷库
     *
     * @param testExamPaper 考试平台卷库
     */
    @Override
    public int insertTestExamPaper(TestExamPaper testExamPaper)
    {
        return testExamPaperMapper.insertTestExamPaper(testExamPaper);
    }

    /**
     * 修改考试平台卷库
     *
     * @param testExamPaper 考试平台卷库
     */
    @Override
    public int updateTestExamPaper(TestExamPaper testExamPaper)
    {
        return testExamPaperMapper.updateTestExamPaper(testExamPaper);
    }

}
